The present invention relates to a vehicle compass and, in particular, to an improved method and apparatus for calibrating a vehicle compass.
Digital compasses for vehicles typically employ a magnetic sensor, such as a flux-gate sensor, that comprises two orthogonally disposed sensing coils. The sensor is mounted in the vehicle so that one of the sensing coils is oriented along the longitudinal axis of the vehicle and the other sensing coil is oriented transversely or laterally relative to the vehicle's axis. The heading direction of the vehicle is determined by analyzing the sensor's response from the two orthogonally disposed sensing coils and computing the resulting radius vector.
It has long been recognized that vehicles exhibit their own unique remnant magnetic fields which distort the output of a magnetic sensor. In addition, the metal body structure of a vehicle also distorts the earth's magnetic field in the vicinity of the compass sensor. Accordingly, in order to obtain a true indication of vehicle direction, it is necessary to compensate for these effects. Numerous compass calibration routines have been proposed for accomplishing this objective.
One known approach requires that the operator initiate a calibration routine and orient the vehicle in the due north (or south) direction and depress a calibration button. The compass electronics then automatically calculate the appropriate offset signal to be supplied to the E-W sensor coil to cause the sensor output to read due north (or south). The vehicle is then reorientated by the operator in the due east (or west) direction and the calibration button again depressed. The compass electronics then automatically calculate the appropriate offset signal to be supplied to the N-S sensor coil to cause the sensor output to read due east (or west). A calibration process of this type is described in U.S. Pat. No. 4,546,551, to Franks.
A second known calibration technique requires that the operator drive the vehicle in one or more circles while the compass electronics analyze the sensor outputs from both orthogonal sensing coils. The values of the vehicle's remnant magnetic field in the two sensor directions simply comprises the algebraic average of the sensor's responses for a defined number of complete circles. Alternatively, the vehicle's remnant magnetic field comprises the algebraic average of the maximum and minimum peak responses from the two sensor coils. In addition, the sensor's sensitivity coefficients are proportional to the sum of the absolute values of the maximum and minimum peak responses. Consequently, with this data appropriate compensation signals can be produced and supplied to the sensor coils to correct for the vehicle's effect on the sensed magnetic field and enable an accurate reading of vehicle heading. A calibration technique of this type is disclosed in U.S. Pat. No. 3,991,361, to Mattern et al.
While the known calibration techniques are effective, they suffer the disadvantage of being time consuming and requiring dedicated labor to implement and therefore are costly to the manufacturer of the vehicle. In particular, the first described process typically requires that each vehicle be driven off the assembly line to a designated location near the factory that is free of magnetic disturbances and then successively oriented in the two predetermined directions as the operator sequences through the various steps of the calibration process. Not only is this process time consuming, but the accuracy of the calibration is dependent upon the accuracy with which the operator points the vehicle.
The second described process also typically requires that each vehicle be driven off the assembly line to a designated location that is relatively flat and free of external magnetic disturbances. The operator then actuates a button or a predetermined button sequence and the vehicle is slowly driven in a circle until the compass system determines it has sufficient valid data to make the appropriate compensation. While simpler than the first process, this calibration process is also time consuming and is labor intensive as it requires the services of one or more non-production employees to calibrate the vehicles as they leave the assembly line.
Notwithstanding initial calibration, existing compass systems typically require periodic recalibration to correct for variations and changes in the vehicle's magnetic field as well as in the vehicle's distortion of the earth's magnetic field. Consequently, it has additionally been proposed to provide automatic adaptive calibration of the compass system during normal operation of the vehicle in an effort to reduce the periodic need to manually recalibrate the system. One existing automatic calibration process continuously monitors the vehicle's direction heading and detects when the vehicle has been driven through a complete 360.degree. excursion. The maximum and minimum peak responses of the sensing coils are then stored and averaged with a number of preexisting sets of data from previous 360.degree. excursions and the results used to adjust the compensation signals supplied to the sensing coils. Consequently, depending on the manner in which a particular vehicle is driven, the calibration data of the system may change as frequently as daily or as infrequently as monthly. Obviously, the more infrequent the calibration data is updated, the less effective the automatic calibration routine is in accurately compensating for changes in the magnetic characteristics of the vehicle. A vehicle compass system having automatic calibration of this type is described in U.S. Pat. No. 4,953,305 to Van Lente et al.
Accordingly, it is the primary object of the present invention to provide an improved vehicle compass system that overcomes the above-described disadvantages of existing vehicle compass systems. In particular, it is an object of the present invention to provide a vehicle compass system that can be initially calibrated on the assembly line at the vehicle manufacturing facility. In addition, it is an object of the present invention to provide a vehicle compass system that is capable of performing this initial factory calibration process automatically during final assembly of the vehicle.
It is a further object of the present invention to provide an improved vehicle compass system that incorporates an automatic calibration routine that continuously updates the calibration coefficients of the sensor each time a valid reading is taken so that compensation data is updated on a much more frequent basis.
The vehicle compass system according to the present invention contains two alternative factory calibration schemes: a manual calibration version and an automatic calibration version. For the manual calibration method, a designated location along the final portion of the assembly line where the magnetic environment is known and stable is preselected and the magnetic characteristics of the location stored in the non-volatile memory of the compass. When the vehicle reaches the designated location on the line, an operator initiates a predetermined button sequence on the compass display to place the compass in the manual factory calibration mode. Thereupon, the compass measures the magnetic fields for the forward and lateral directions and compares the measured values with the pre-stored values in its non-volatile memory. If the measured field values differ from the stored field data, a current is passed through the appropriate sense winding in the proper direction to offset the discrepant magnetic field until the measured value corresponds with the stored field data. The resulting compensation coefficients are then stored in the compass's non-volatile memory and the calibration process is complete.
Alternatively, it will be recognized that if the dynamic range of the measurement system is large enough, calibration of the system need not be performed by implementing a hardware correction, but may instead be performed with software by simply remembering the observed offset and using it to make subsequent software corrections to the measured field readings.
The automatic factory calibration process is similar to the manual factory calibration process except for the procedure used to initiate the calibration routine. Rather than requiring the actuation of a preselected button sequence, the automatic factory calibration process identifies a unique assembly line operation and uses the occurrence of this event to automatically initiate the factory calibration routine. In the preferred embodiment, the proposed event is the point during final assembly of the vehicle when the vehicle's ignition is first turned on and the transmission engaged as part of the engine and drive train test. The microcomputer in the compass is programmed to identify this event and automatically initiate the factory calibration process without operator intervention. The magnetic characteristics of this location in the assembly plant are pre-stored in the non-volatile memory of the compass and the calibration process proceeds in the same manner as that described for the manual factory calibration process. Since the magnetic signature of this location where the automatic calibration process is performed is unique, the automatic calibration process is enabled only once and then locked out so that the automatic calibration routine cannot be inadvertently re-enabled after the vehicle leaves the factory. In addition, the automatic factory calibration is preferably locked out if the manual factory calibration process is performed. Moreover, the entire factory calibration routine is preferably locked out after the vehicle has been driven at speeds greater than a preselected value for a specified number of times.
The present vehicle compass system also includes a unique adaptive calibration routine that automatically updates the data used to calculate the compensation coefficients each time a valid reading is taken. In the preferred embodiment, this occurs approximately every 30 milliseconds. Consequently, the likelihood of the present compass system drifting out of calibration are greatly reduced. The present compass system performs this continuous automatic calibration process in the following manner. Each time new valid data is obtained, the appropriate heading vector is calculated. The calculated heading vector is then compared to the closest north, south, east, or west corrected radius vector and the difference used in a weighted average formula to update the value of the corrected radius vector. In addition, a new center calculation is also performed using a similar weighted average formula and the values of the compensation coefficients updated accordingly if the center excursion is outside predetermined acceptable limits.
Lastly, an improved technique is used to make the threshold determination of whether the newly received data samples represent valid data based upon the speed of the vehicle and the observed rate of change in the data sample values. In this manner, the compass display more closely tracks the changes in vehicle direction, particularly during low speed maneuvers where the direction heading can change relatively rapidly.